<template>
	<view class="bottom">
		<view class="flex1 bottomBox" v-if="flowList">
			<view class="listDataBox" v-for="(item,index) in flowList" @click="btnDetails(item,index,'right')"
				:key="index">
				<u-lazy-load class="imgs" v-if="item.type == 'image'" :image="item.content_url" mode="">
				</u-lazy-load>
				<view class="videoImg" v-if="item.type == 'video' && item.videoImg">
					<image class="stopVideo" src="https://img.aibbyp.com/wechat/images/nHome/videozt.png" mode="">
					</image>
					<u-lazy-load class="imgs" :image="item.videoImg" mode="">
					</u-lazy-load>
				</view>

				<view class="flex_start flex_sb mt12">
					<view class="overflow_1 f28 mt10 pl18 pr18 flex1" v-if="item.title">
						{{item.title}}
					</view>
					<view class="ml12 mr12" v-if="item.goods[0]"
						@click.stop="$wanlshop.auth('/pages/product/goods?id='+item.goods[0].id)">
						<image style="width: 30rpx;height: 30rpx;"
							src="https://img.aibbyp.com/wechat/images/nHome/gwc.png" mode=""></image>
					</view>
				</view>
				<view class="flex_sb shops">
					<view class="overflow_1">
						<view class="flex_ac" v-if="item && item.shop">
							<image class="shopImg" v-if="item.shop && item.shop.avatar" :src="item.shop.avatar" mode="">
							</image>
							<view class="ml8 f20 c3 overflow_1" v-if="item.shop">
								{{item.shop.shopname}}
							</view>
						</view>
					</view>
					<view class="flex_ac">
						<u-icon name="eye" size="20"></u-icon>
						<view class="f20 ml8">
							{{item.views}}
						</view>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		props: {
			flowList: {
				type: Array,
				default: []
			},
			statusMore: {
				type: String,
				default: 'loading'
			},

		},
		data() {
			return {
				contentText: {
					contentdown: '下拉加载更多',
					contentrefresh: '加载中',
					contentnomore: '没有更多数据了'
				},
			}
		},
		methods: {
			// 去详情
			btnDetails(item, index, type) {
				let ids = this.flowList.map(a => a.id)
				uni.navigateTo({
					url: '/pages/homeRecommend/videoSwiper?ids=' + ids + '&index=' + index
					// url: '/pages/homeRecommend/index?id=' + i.id
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.videoImg {
		// width: 100%;
		// height: 100%;
		position: relative;

		.stopVideo {
			position: absolute;
			width: 80rpx;
			height: 80rpx;
			top: calc(50% - 40rpx);
			left: calc(50% - 40rpx);
			z-index: 2;
		}
	}

	.bottomBox {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;

		.listDataBox {
			width: 49%;
		}
	}

	.bottom {
		margin-top: 18rpx;
		padding: 0 26rpx 32rpx 26rpx;

		padding-bottom: 30rpx;
		width: 100%;
		overflow: hidden;
		box-sizing: border-box;
		/* #ifdef H5 */
		padding-bottom: 90rpx;

		/* #endif */
		::v-deep .u-waterfall {
			width: calc(100% - 0rpx);
			justify-content: space-between;

			.u-column {
				width: 48%;
			}

			.u-column:nth-child(2) {
				margin-left: 16rpx;
			}
		}

		.listDataBox {
			margin-bottom: 14rpx;
			background: #fff;
			border-radius: 32rpx;

			.shops {
				padding: 10rpx 18rpx;
			}

			.imgs {
				border-radius: 12rpx !important;
				width: 100%;
				height: 450rpx;

				::v-deep .u-lazy-item {
					width: 100%;
					height: 450rpx !important;
				}
			}


			.shopImg {
				width: 20rpx;
				height: 20rpx;
				border-radius: 50% 50%;
			}
		}
	}
</style>